<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>文章列表--layui后台管理模板 2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/dist/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/style/css/public.css" media="all"/>
</head>
<body class="childrenBody">
<form class="layui-form layui-row layui-col-space10" id="submitForm" method="post" enctype="multipart/form-data">

    <div class="layui-col-md12 layui-col-xs12">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md5 layui-col-xs12">
                <div class="layui-form-item webname">
                    <label class="layui-form-label">网站名称</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" id="webname" name="webname" lay-verify="required"
                               placeholder="请输入网站名称">
                    </div>
                </div>
                <div class="layui-form-item url">
                    <label class="layui-form-label">网址</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" id="url" name="url" lay-verify="required"
                               placeholder="请输入网址">
                    </div>
                </div>

                <div class="layui-form-item motto">
                    <label class="layui-form-label">介绍</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" id="motto" name="motto" lay-verify="required"
                               placeholder="请输入网站介绍">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">网站logo</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn" onclick="webicon.click();">
                            <i class="layui-icon">&#xe67c;</i>上传文件
                        </button>
                        <br/>
                        <input type="text" class="layui-input" style="border: none;background-color: #fff" disabled
                               readonly="readonly" id="file_name"/>

                    </div>
                </div>


                <div class="layui-form-item" hidden="hidden">
                    <label class="layui-form-label">文件</label>
                    <div class="layui-input-block file">
                        <input type="file" multiple class="" id="webicon" name="webicon" lay-verify="webicon"
                               onchange="preview(this);">
                    </div>
                </div>

                <div class="layui-form-item webmaster">
                    <label class="layui-form-label">网站站长</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" id="webmaster" name="webmaster" lay-verify="required"
                               placeholder="请输入站长姓名">
                    </div>
                </div>

                <div class="layui-form-item type">
                    <label class="layui-form-label">分类</label>
                    <div class="layui-input-block">
                        <select name="type" lay-verify="required" id="type">
                            <option value="1">好友博客</option>
                            <option value="2">大佬博客</option>
                            <option value="3">学习网站</option>

                        </select>
                    </div>
                </div>

                <div class="layui-form-item email">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block">
                        <input type="text" class="layui-input" id="email" name="email" lay-verify="email"
                               placeholder="请输入邮箱">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-col-md12 layui-col-xs12 layui-center">
        <a class="layui-btn layui-btn-sm" lay-filter="addLink" lay-submit><i class="layui-icon">&#xe605;</i>确定</a>
        <a class="layui-btn layui-btn-primary layui-btn-sm close"><i class="layui-icon">&#x1006;</i>关闭</a>
    </div>
</form>
<script type="text/javascript" src="/dist/layui/layui.js"></script>
<script type="text/javascript" src="/manage/link/link.js"></script>
<script type="text/javascript">
    function preview(fileDom) {
        document.getElementById("file_name").value = fileDom.value;
        var file = fileDom.files[0];
        var oSize = file.size / 1024 / 1024;
        if (oSize > 1) {
            layer.msg("LOGO文件不能大于1M！", {icon: 2});
            $('#cover').val('');
            $('#file_name').val('');
        }
    }
</script>
</body>
</html>